package cn.kgc.service.impl;

import cn.kgc.dao.SmbmsUserDao;
import cn.kgc.entity.SmbmsUser;
import cn.kgc.service.SmbmsUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.SQLException;
import java.util.List;

/**
 * @author Rock
 * @create 2020-08-24 21:44
 */
@Service("SmbmsUserService")
public class SmbmsUserServiceImpl implements SmbmsUserService {

    @Autowired
    private SmbmsUserDao userDao;

    @Override
    public List<SmbmsUser> getAll() throws SQLException {
        List<SmbmsUser> users = userDao.queryAll();
        return users;
    }
    @Override
    public List<SmbmsUser> getUserByName(String userName) throws SQLException {
        List<SmbmsUser> users = userDao.queryUserByName(userName);
        return users;
    }
}
